<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorator="layout">
<head>
    <title>后台管理</title>
</head>
<body>
<div layout:fragment="content">
    <table class="table table-bordered table-striped">
        <thead>
        <tr>
            <td>ID</td>
            <td>创建时间</td>
            <td>用户名</td>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
        <tr th:if="${users.isEmpty()}">
            <td colspan="3">还未创建用户</td>
        </tr>
        <tr th:each="user : ${users}">
            <td th:text="${user.id}">1</td>
            <td th:text="${#calendars.format(user.createdDate)}">July 11,
                2012 2:17:16 PM CDT
            </td>
            <td th:text="${user.name}">name</td>
            <td><a href="#" th:href="@{'/admin/user/' + ${user.id}}"> 删除 </a></td>
        </tr>
        </tbody>
    </table>
    Logged user: <span sec:authentication="name">Bob</span>
    Roles: <span sec:authentication="principal.authorities">[ROLE_USER, ROLE_ADMIN]</span>
</div>
</body>
</html>